using System;

namespace SharpMud.Net.Telnet.MXP.Tokens
{
	public class Element : IElement
	{
		#region Static Stuff
		static Element()
		{
			_Pattern = new System.Text.RegularExpressions.Regex(Patterns.Composite,System.Text.RegularExpressions.RegexOptions.Compiled | System.Text.RegularExpressions.RegexOptions.IgnoreCase);
		}
		private static System.Text.RegularExpressions.Regex _Pattern;
		internal static System.Text.RegularExpressions.Regex Pattern
		{
			get
			{
				return _Pattern;
			}
		}

		internal class Patterns
		{
			public static string Composite
			{
				get
				{
					return TagStart + ElementName + Whitespace + MultipleParameters + Whitespace + OptionalEmpty + TagEnd;
				}
			}
			public static string TagStart
			{
				get
				{
					return System.Text.RegularExpressions.Regex.Escape("<");
				}
			}
			public static string TagEnd
			{
				get
				{
					return System.Text.RegularExpressions.Regex.Escape(">");
				}
			}
			public static string ElementName
			{
				get
				{
					return @"[a-z]+[\w]*";
				}
			}
			public static string Whitespace
			{
				get
				{
					return @"[\s]*";
				}
			}
			public static string MultipleParameters
			{
				get
				{
					return "";
				}
			}
			public static string ParameterExpression
			{
				get
				{
					return "[" + ParameterNameAndEquals + "]+";
				}
			}
			public static string ParameterNameAndEquals
			{
				get
				{
					return @"[a-z]+[\w]*" + Whitespace + "=" ;
				}
			}
			public static string ParameterValue
			{
				get
				{
					return @"[\w]*";
				}
			}
			public static string OptionalEmpty
			{
				get
				{
					return "";
				}
			}
		}
		#endregion

		#region IElement Members

		public string Name
		{
			get
			{
				// TODO:  Add Element.Name getter implementation
				return null;
			}
		}

		public IElementParameter[] Parameters
		{
			get
			{
				// TODO:  Add Element.Parameters getter implementation
				return null;
			}
		}

		public bool IsExplicitlyEmpty
		{
			get
			{
				// TODO:  Add Element.IsExplicitlyEmpty getter implementation
				return false;
			}
		}

		#endregion

		#region IMxpToken Members

		public SharpMud.Net.Telnet.MXP.TokenType TokenType
		{
			get
			{
				// TODO:  Add Element.TokenType getter implementation
				return (SharpMud.Net.Telnet.MXP.TokenType)0;
			}
		}

		#endregion

		#region ITextFormatEffect Members

		public string Render(SharpMud.Net.Telnet.Session.TelnetSessionBase telnetSession)
		{
			// TODO:  Add Element.Render implementation
			return null;
		}

		#endregion
	}
}
